const { createProxyMiddleware: proxy } = require("http-proxy-middleware");
module.exports = (app) => {
    app.use(
        process.env.REACT_APP_BASE_API,
        proxy({
            // 此处的端口号要与后期数据请求的数据端一致
            target: "http://localhost:9000",
<<<<<<< HEAD
            // target: "http://tf84v6.natappfree.cc/getAll",
=======
            // target: "http://7p6qf6.natappfree.cc",//外网
>>>>>>> da913d906aa3710ee72c6083c58ccd459c87f762
            changeOrigin: true,
            pathRewrite: { "^/api": ' ' }
        })
    );
};
